import java.util.Scanner;

public class Demo {

    private static final Scanner scanner = new Scanner(System.in);

    public static void main(String[] args) {
        int choice;
        while (true) {
            System.out.println("\n欢迎使用黄石阿凯购物管理系统");
            System.out.println("1.登陆系统");
            System.out.println("2.退出");
            System.out.println("****************************");
            System.out.println("请选择，输入数字：");
            choice = scanner.nextInt();
            scanner.nextLine();
            switch (choice) {
                case 1:
                    mainMenu();
                    break;
                case 2:
                    System.out.println("退出系统。。。");
                    return;
                default:
                    System.out.println("无效选项，请重新选择");
            }
        }
    }

    private static void mainMenu() {
        int choice;
        while (true) {
            System.out.println("\n欢迎使用黄石阿凯购物管理系统");
            System.out.println("****************************");
            System.out.println("1.客户信息管理");
            System.out.println("2.真情回顾");
            System.out.println("****************************");
            System.out.println("请选择，输入数字或按0返回上一级菜单：");
            choice = scanner.nextInt();
            scanner.nextLine();
            switch (choice) {
                case 1:
                    customerManagementMenu();
                    break;
                case 2:
                    specialEventMenu();
                    break;
                case 0:
                    return;
                default:
                    System.out.println("无效选项，请重新选择");
            }
        }
    }

    public static void customerManagementMenu() {
        int choice;
        while (true) {
            System.out.println("黄石阿凯购物管理系统主菜单>客户信息管理");
            System.out.println("****************************");
            System.out.println("1.添加客户");
            System.out.println("2.修改客户");
            System.out.println("3.删除客户");
            System.out.println("****************************");
            System.out.println("请选择，输入数字或按0返回上一级菜单：");
            choice = scanner.nextInt();
            scanner.nextLine();
            switch (choice) {
                case 1:
                    System.out.println("执行添加客户");
                    break;
                case 2:
                    System.out.println("执行修改客户");
                    break;
                case 3:
                    System.out.println("执行删除客户");
                    break;
                case 0:
                    return;
                default:
                    System.out.println("输入数字0返回上一级菜单：");
            }
        }
    }

    public static void specialEventMenu() {
        int choice;
        while (true) {
            System.out.println("黄石阿凯购物管理系统主菜单>真情回顾");
            System.out.println("****************************");
            System.out.println("1.幸运大放送");
            System.out.println("2.幸运抽奖");
            System.out.println("3.生日问候");
            System.out.println("****************************");
            System.out.println("请选择，输入数字或按0返回上一级菜单：");
            choice = scanner.nextInt();
            scanner.nextLine();
            switch (choice) {
                case 1:
                    System.out.println("执行幸运大放送");
                    break;
                case 2:
                    System.out.println("执行幸运抽奖");
                    break;
                case 3:
                    System.out.println("执行生日问候");
                    break;
                case 0:
                    return;
                default:
                    System.out.println("输入数字0返回上一级菜单：");
            }
        }
    }
}
